To achieve a more realistic photographic image, captured image may be subjected to tonal correction. Tonal correction can improve image contrast, redistribute, accentuate or play down low-key, mid-key, and high-key tones. Tonal correction is a common procedure used to enhance the visual appeal of photographic images. In the world of digital photography, tonal correction operates by reshaping the image histogram to expand or compress low-key, mid-tone and high-key regions.
For example, FIG. 1 is an image which includes a person in the foreground and a background containing a bright lamp. Both the person and the bright lamp are imaged without loss of detail, however the person looks underexposed due to the brightness of the lamp which decreases the overall image exposure. Merely increasing the exposure while more correctly exposing the person would lead to brightness clipping and loss of detail of the lamp. Clipping occurs when a pixel output signal is limited in some way by the full range of an amplifier, ADC or other device within an imaging device which captures the image. When this occurs, the pixel signal is flattened at the peak values and information is lost.
Furthermore, both over-saturated and overly pale skin tones lose visual appeal, as seen in FIG. 2, which is a close up of the person in FIG. 1; the FIG. 2 image is overexposed. Human vision is very discerning about certain color tones such as skin. Therefore it is important that the tonal correction operator does not adversely affect such tones.
Conventional tonal correction methods used to alter the image in attempt to optimally expose both the lamp and the person. For example, one conventional method for tonal correction is to combine it with a gamma correction (or brightness correction) step, wherein the following equations are applied:R′=fG(fT(R),γ)=fG,T(R,γ)  (1)G′=fG(fT(G),γ)=fG,T(G,γ)  (2)B′=fG(fT(B),γ)=fG,T(B,γ)  (3)
wherein fG is the gamma correction function, fT is the tonal correction function, fG,T is the function resulting from combining gamma correction with tonal correction, γ is gamma, or the power to which R, G, B are raised in the gamma correction function. This method may save hardware and/or reduce software computational complexity, however, in doing so, output image saturation may be adversely impacted. FIG. 3 is a close up of the person's face of FIG. 1 having the above-described tonal correction applied to it. There is excessive saturation of color, and where this saturation occurs in the skin, it can also make the person look red-faced and sick.
To provide a pleasing rendering of skin tones, the tonal correction operation should be able to preserve pixel saturation while affecting only luminance. By reshaping the image histogram, the image can be altered to have both the person and the lamp exposed properly. The low-key tones where the person is imaged may be stretched and the high-key tones where the bright lamp is imaged may be compressed to have both the person and the lamp properly exposed. Therefore, it is desirable to have an apparatus and method for stretching and compressing low-key, mid-key, and high-key tones for tonal correction that preserves the original saturation of the image without loss of detail.